transition between mmio and RAM-backed. This isn't true after a
an add_to_physmap memory op. Fix this by just blowing the shadow tables
after every such operation; they're rare enough that the performance
hit is not a concern.
Signed-off-by: Steven Smith <sos22@cam.ac.uk>
Acked-by: Tim Deegan <Tim.Deegan@xensource.com>
guest_physmap_add_page(d, xatp.gpfn, mfn);
UNLOCK_BIGLOCK(d);
-
+
+ /* If we're doing FAST_FAULT_PATH, then shadow mode may have
+ cached the fact that this is an mmio region in the shadow
+ page tables. Blow the tables away to remove the cache.
+ This is pretty heavy handed, but this is a rare operation
+ (it might happen a dozen times during boot and then never
+ again), so it doesn't matter too much. */
+ shadow_lock(d);
+ shadow_blow_tables(d);
+ shadow_unlock(d);
+
put_domain(d);
break;
/* Deliberately free all the memory we can: this will tear down all of
* this domain's shadows */
-static void shadow_blow_tables(struct domain *d)
+void shadow_blow_tables(struct domain *d)
{
struct list_head *l, *t;
struct shadow_page_info *sp;
* Returns non-zero if we need to flush TLBs. */
extern int shadow_remove_all_mappings(struct vcpu *v, mfn_t target_mfn);
+/* Remove all mappings from the shadows. */
+extern void shadow_blow_tables(struct domain *d);
+
void
shadow_remove_all_shadows_and_parents(struct vcpu *v, mfn_t gmfn);
/* This is a HVM page that we thing is no longer a pagetable.